function statusFormatter(value, row, index) {
    var css = "default";
    if("finish"==row.status){
        css = "success";
    }else if("cancel"==row.status){
        css = "muted";
    }else if("run"==row.status){
        css = "warning";
    }
    var str = '<label class="text-'+css+'">'+value+'</label>';
    return str;
}

function view(instanceId) {
    window.location.href = "/static/bflow/ui/example/leave/view.html?instanceId="+instanceId;
}